/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 小料间审核Entity
 * @author HOHD
 * @version 2021-03-04
 */
@Table(name="st_small_material_approve_history", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="material_code", attrName="materialCode", label="物料编码"),
		@Column(name="material_name", attrName="materialName", label="物料名称", queryType=QueryType.LIKE),
		@Column(name="pack_type", attrName="packType", label="规格"),
		@Column(name="online_number", attrName="onlineNumber", label="上班结存量"),
		@Column(name="get_number", attrName="getNumber", label="领出量"),
		@Column(name="theory_use_number", attrName="theoryUseNumber", label="理论用量"),
		@Column(name="theory_left_number", attrName="theoryLeftNumber", label="理论剩余量"),
		@Column(name="take_stock_value", attrName="takeStockValue", label="盘点值"),
		@Column(name="case_number", attrName="caseNumber", label="领出件数"),
		@Column(name="diff_number", attrName="diffNumber", label="差异"),
		@Column(name="take_status", attrName="takeStatus", label="盘点状态"),
		@Column(name="profit_loss_percent", attrName="profitLossPercent", label="每包损益率"),
		@Column(name="take_man", attrName="takeMan", label="盘点人"),
		@Column(name="take_man_code", attrName="takeManCode", label="盘点人编码"),
		@Column(name="take_date", attrName="takeDate", label="盘点时间"),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
	}, orderBy="a.id DESC"
)
public class StSmallMaterialApproveHistory extends DataEntity<StSmallMaterialApproveHistory> {
	
	private static final long serialVersionUID = 1L;
	private String materialCode;		// 物料编码
	private String materialName;		// 物料名称
	private String packType;		// 规格
	private BigDecimal onlineNumber;		// 上班结存量
	private Integer getNumber;		// 领出量
	private BigDecimal theoryUseNumber;		// 理论用量
	private BigDecimal theoryLeftNumber;		// 理论剩余量
	private BigDecimal takeStockValue;		// 盘点值
	private Integer caseNumber;		// 领出件数
	private BigDecimal diffNumber;		// 差异
	private Integer takeStatus;		// 盘点状态
	private BigDecimal profitLossPercent;		// 每包损益率
	private String takeMan;		// 盘点人
	private String takeManCode;		// 盘点人编码
	private Date takeDate;		// 盘点时间
	
	public StSmallMaterialApproveHistory() {
		this(null);
	}

	public StSmallMaterialApproveHistory(String id){
		super(id);
	}

	public BigDecimal getOnlineNumber() {
		return onlineNumber;
	}

	public void setOnlineNumber(BigDecimal onlineNumber) {
		this.onlineNumber = onlineNumber;
	}

	public BigDecimal getTheoryUseNumber() {
		return theoryUseNumber;
	}

	public void setTheoryUseNumber(BigDecimal theoryUseNumber) {
		this.theoryUseNumber = theoryUseNumber;
	}

	public BigDecimal getTheoryLeftNumber() {
		return theoryLeftNumber;
	}

	public void setTheoryLeftNumber(BigDecimal theoryLeftNumber) {
		this.theoryLeftNumber = theoryLeftNumber;
	}

	public BigDecimal getTakeStockValue() {
		return takeStockValue;
	}

	public void setTakeStockValue(BigDecimal takeStockValue) {
		this.takeStockValue = takeStockValue;
	}

	public BigDecimal getDiffNumber() {
		return diffNumber;
	}

	public void setDiffNumber(BigDecimal diffNumber) {
		this.diffNumber = diffNumber;
	}

	public BigDecimal getProfitLossPercent() {
		return profitLossPercent;
	}

	public void setProfitLossPercent(BigDecimal profitLossPercent) {
		this.profitLossPercent = profitLossPercent;
	}

	@NotBlank(message="物料编码不能为空")
	@Length(min=0, max=20, message="物料编码长度不能超过 20 个字符")
	public String getMaterialCode() {
		return materialCode;
	}

	public void setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
	}
	
	@Length(min=0, max=20, message="物料名称长度不能超过 20 个字符")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Length(min=0, max=10, message="规格长度不能超过 10 个字符")
	public String getPackType() {
		return packType;
	}

	public void setPackType(String packType) {
		this.packType = packType;
	}
	

	public Integer getGetNumber() {
		return getNumber;
	}

	public void setGetNumber(Integer getNumber) {
		this.getNumber = getNumber;
	}
	

	public Integer getCaseNumber() {
		return caseNumber;
	}

	public void setCaseNumber(Integer caseNumber) {
		this.caseNumber = caseNumber;
	}
	

	public Integer getTakeStatus() {
		return takeStatus;
	}

	public void setTakeStatus(Integer takeStatus) {
		this.takeStatus = takeStatus;
	}
	

	@Length(min=0, max=5, message="盘点人长度不能超过 5 个字符")
	public String getTakeMan() {
		return takeMan;
	}

	public void setTakeMan(String takeMan) {
		this.takeMan = takeMan;
	}
	
	@Length(min=0, max=20, message="盘点人编码长度不能超过 20 个字符")
	public String getTakeManCode() {
		return takeManCode;
	}

	public void setTakeManCode(String takeManCode) {
		this.takeManCode = takeManCode;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTakeDate() {
		return takeDate;
	}

	public void setTakeDate(Date takeDate) {
		this.takeDate = takeDate;
	}
	
}